<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<script src="${pageContext.request.contextPath}/js/Echarts/china.js"></script>
<style>
	.btnarea {
    margin-left: -10%;
    padding-top: 12px;
    width: 100%;
}
.mapBottom table tr td{
	vertical-align:middle;
}
.mapBottom table tr th{
	text-align:center;
}
.mapBottom table tr td{
	width:10%;
	word-wrap: break-word;
	word-break:break-all;
	text-align:center;
}
</style>
<div ng-controller="processMonitorController as controller">
	<div class="wrap">
		<div class="mapTips">
			<h6>
				<i class="glyphicon glyphicon-cog"></i> <span>条件设置</span>
			</h6>
		</div>
		<div class="conditionWrap">
			<div class="wrapFirst" style="height:57px;margin-bottom:50px;margin-top:10px">
				<form role="from" name="tableForm" class="form-horizontal">
					<div class="from-group">
						<div class="row">
							<div class="col-md-10 col-sm-10 col-xs-10">
								<label for="input-userNo_search" class="control-label" style="padding: 19px 19px 0 3%;font-weight:blod;font-size:11px;float:left;">IP:</label>
									<div style="width: 35%;margin-top: 10px;float: left;">
										<input style="" ng-model="controller.queryCondition.ipIndex" type="text"
										class="form-control" id="input-userNo_search" placeholder="0.0.0.0">
									</div>
							</div>
							<div class="col-md-2 col-sm-2 col-xs-2">
								<div class="btnarea">
									<a class="btn btn-primary" style="margin-right: 6px;width:39%;"
									ng-click="controller.search()"> <!-- <i class="fa fa-search"></i> -->搜索
									</a>
									<a class="btn btn-danger" style="width:39%;" ng-click="controller.reset()"> <!-- <i
											class="fa fa-search"></i> -->重置
									</a>
								</div>
								
							</div>
						</div>
						<div style="padding: 19px 0 0 0;">
							<button class="btn btn-default" ng-click="controller.insertConfig()" type="button" style="margin-right:8px;float:left;">新增配置</button>
							<button class="btn btn-default" type="button" ng-click="controller.updateConfig()" style="margin-right:8px;float:left;">编辑配置</button>
							<button class="btn btn-default" type="button" ng-click="controller.deleteConfig()">删除配置</button>
						</div>
						
					</div>
				</form>
			</div>
		</div>
		<div class="mapBottom table-bordered"
			style="font-size: 13px; background: white;">
			<table class="table table-bordered" style="font-size: 13px;">
				<tr>
					<th style="width:1%;"><input type="checkbox" id="check_all"/></th>
					<th style="display:none;"  >id</th>
					<th style="display:none;"  >hostid</th>
					<th  >IP</th>
					<th style="width:10%;">服务</th>
					<th style="width:10%;">类型</th>
					<th style="">状态</th>
					<th style="width:10%;">告警次数</th>
					<th style="width:10%;">告警频率</th>
					<th style="width:10%;">描述</th>
					<th style="width:10%;">用途</th>
					<th >查看</th>
				</tr>
				<tr ng-repeat="data in controller.processConfigList">
					<td style="width:1%;" align="center"><input type="checkbox" class="check_item" />		
					<td style="display:none;">{{data.id}}</td>
					<td style="display:none;">{{data.hostid}}</td>
					<td >{{data.ip}}</td>
					<td >{{data.command}}</td>
					<td  ng-switch="data.type">
						<p ng-switch-when="0">进程非告警</p>
						<p ng-switch-when="1">进程告警</p>
						<p ng-switch-when="2">服务命令</p>
					</td>
					<td  ng-switch="data.status">
						<p ng-switch-when="null"></p>
						<p ng-switch-default>{{data.status}} </p>
					</td>
					<td >{{data.times}}</td>
					<td >{{data.minutes}}</td>
					<td >{{data.desc}}</td>
					<td ng-switch="data.purpose">
						<p ng-switch-when="null"></p>
						<p ng-switch-default>{{data.purpose}} </p>
					</td>	
					<td  style="width: 25%;" ng-switch="data.type">
						<div ng-switch-default>
							<button ng-click="controller.ckeckIPInfo(data)" class="btn btn-primary btn-sm" style="margin-right:4px;">查看IP</button>	
							<button ng-click="controller.ckeckProcessInfo(data)" class="btn btn-danger btn-sm" style="margin-left:4px;">查看进程</button>
						</div>
						<div ng-switch-when="2">
							<button ng-click="controller.ckeckIPInfo(data)" class="btn btn-primary btn-sm" style="margin-right:4px;">查看IP</button>	
							<button ng-click="controller.ckeckProcessfuwu(data)" class="btn btn-danger btn-sm" style="margin-left:4px;">查看服务</button>
						</div>
					</tr>
			</table>
			<div class="spagination "
				style="left: 305px; top: -12px; float: left; width: 1105px; position: relative;">
<!-- 				分页文字信息  -->
				<div class=""
					style="top: 25px; width: 100px; position: absolute; right: 1078px; float: left;">总
					{{controller.paginationInfo.totalElements}}条记录</div>
				<div style="position: absolute; left: 0px;">
					<ul uib-pagination
						total-items="controller.paginationInfo.totalPages"
						ng-model="controller.queryCondition.page"
						max-size="controller.paginationInfo.maxSize" class="pagination-md"
						boundary-links="true" items-per-page="1" rotate="false"
						ng-change="controller.pageChanged();" previous-text="上一页"
						next-text="下一页" first-text="首页" last-text="最后一页"></ul>
					<div class="col-md-1"
						style="top: 27px; left: 98%; width: 117px; position: absolute;">
						跳转
						<div class="col-md-1"
							style="left: 29%; float: left; top: 21px; position: absolute;">
							<input ng-model="controller.queryCondition.forwordPage"
								ng-keyup="enterEvent($event)" type="text" class="form-control"
								style="height: 33px; width: 50px; top: -28px; position: absolute;">
						</div>
						<div style="position: absolute; top: 0px; left: 94%;">页</div>

					</div>
				</div>
			</div>
		</div>
		
	</div>
</div>